package com.heima.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.heima.model.user.pojos.ApUser;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import java.util.List;


public interface ApUserMapper extends BaseMapper<ApUser> {
    @Insert("<script> insert into ap_user (salt,name,password,phone,sex,status,flag,created_time) values <foreach item='user' index='index' collection='list' separator=',' > (#{user.salt},#{user.name},#{user.password},#{user.phone},#{user.sex},#{user.status},#{user.flag},#{user.createdTime}) </foreach> </script>")
    void insertApUsers(List list);
    @Select("select * from ap_user")
    List<ApUser> findAll();
}